package com.cloudloan.enums;

/**
 * <h3>cloudLoan</h3>
 * <p></p>
 *
 * @author zxj
 * @since 2024-09-05 14:04:02
 */
public enum Status {
    PASS(0,"生效"),
    FAIL(1,"失效");
    private final int code;
    private final String name;
    Status(int code,String name) {
        this.code = code;
        this.name=name;
    }

    public int getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static String getName(int code) {
        switch (code){
            case 0:
                return Status.PASS.getName();
                case 1:
                    return Status.FAIL.getName();
            default:
                return "未知状态";
        }
    }
}
